﻿// See https://aka.ms/new-console-template for more information
using System;

namespace PrimeFactors
{
    class Solution
    {
        static void Main(string[] args)
        {
            int num = int.Parse(Console.ReadLine());
            for (int i = 2; i <= num; ++i)
            {
                while (num % i == 0)
                {
                    Console.WriteLine(i);
                    num /= i;
                }
            }
        }
    }

}



